import type { App, Plugin } from 'vue'
import ZtDictColumn from '@/components/zt-dict/zt-dict-column/index.vue'
import ZtDictLabel from '@/components/zt-dict/zt-dict-label/index.vue'
import ZtDictRadio from '@/components/zt-dict/zt-dict-radio/index.vue'
import ZtDictTreeSelect from '@/components/zt-dict/zt-dict-tree-select/index.vue'
import ZtDictSelect from '@/components/zt-dict/zt-dict-select/index.vue'
import ZtDictCheckbox from '@/components/zt-dict/zt-dict-checkbox/index.vue'
import ZtDataColumn from '@/components/zt-data/zt-data-column/index.vue'
import ZtDataLabel from '@/components/zt-data/zt-data-label/index.vue'
import ZtDataSelect from '@/components/zt-data/zt-data-select/index.vue'
import ZtDataTreeSelect from '@/components/zt-data/zt-data-tree-select/index.vue'
import ZtDataTreeLeft from '@/components/zt-data/zt-data-tree-left/index.vue'
import ZtDataTable from '@/components/zt-data/zt-data-table/index.vue'
import ZtImageColumn from '@/components/zt-image-column/index.vue'

import ZtIcon from '@/components/zt-icon/index.vue'
import ZtEditor from '@/components/zt-editor/index.vue'
import ZtMarkdown from '@/components/zt-markdown/index.vue'
import ZtAddress from '@/components/zt-address/index.vue'
import ZtUserInput from '@/components/zt-user/zt-user-input/index.vue'
import ZtUserDialog from '@/components/zt-user/zt-user-dialog/index.vue'
import ZtOrgSelect from '@/components/zt-org/zt-org-select/index.vue'
import ZtOrgInput from '@/components/zt-org/zt-org-input/index.vue'
import ZtRoleInput from '@/components/zt-role-input/index.vue'
import ZtPostInput from '@/components/zt-post-input/index.vue'
import ZtUploadImage from '@/components/zt-upload/zt-upload-image/index.vue'
import ZtUploadImages from '@/components/zt-upload/zt-upload-images/index.vue'
import ZtUploadFile from '@/components/zt-upload/zt-upload-file/index.vue'
import ZtUploadExcel from '@/components/zt-upload/zt-upload-excel/index.vue'

const components = [
	ZtEditor,
	ZtMarkdown,
	ZtAddress,
	ZtIcon,
	ZtDictLabel,
	ZtDictColumn,
	ZtDictRadio,
	ZtDictSelect,
	ZtDictCheckbox,
	ZtDictTreeSelect,
	ZtDataColumn,
	ZtDataLabel,
	ZtDataSelect,
	ZtDataTreeSelect,
	ZtDataTreeLeft,
	ZtDataTable,
	ZtImageColumn,
	ZtUserInput,
	ZtUserDialog,
	ZtOrgSelect,
	ZtOrgInput,
	ZtRoleInput,
	ZtPostInput,
	ZtUploadImage,
	ZtUploadImages,
	ZtUploadFile,
	ZtUploadExcel
]

const ZtComponent: Plugin = {
	install(Vue: App) {
		components.forEach((component: any) => {
			Vue.component(component.name, component)
		})
	}
}

export default ZtComponent
